﻿@*@inherits RazorEngine.Templating.TemplateBase<Gardener.CodeGeneration.Dtos.CodeGenNameModel>*@


using AntDesign;
using @(Model.AppName).Client.Base;
using @(Model.AppName).Client.Base.Components;
using @(Model.AppName).@(Model.Module).Resources;

namespace @(Model.AppName).@(Model.Module).Client;

public abstract class @(Model.Module)BaseTable<TDto, TOperationDialog>
    : @(Model.CodeGen.MainTableInherits)<TDto, @(Model.CodeGen.PrimaryKeyType), TOperationDialog, @(Model.Module)Resource> 
    where TDto : @(Model.Module)BaseDto, new() 
    where TOperationDialog : FeedbackComponent<OperationDialogInput<@(Model.CodeGen.PrimaryKeyType)>, OperationDialogOutput<@(Model.CodeGen.PrimaryKeyType)>>
{
#region Init
    public readonly string _ControllerName;
    public string _Module = "@(Model.Module)";

    protected @(Model.Module)BaseTable(string controllerName)
    {
        this._ControllerName = controllerName;
    }

    public string GetAuthKey(string key)
    {
        return _Module + "_" + _ControllerName + "_" + key;
    }

    protected virtual async Task ReloadPage()
    {
        // Reload Main Table
        await ReLoadTable();

        // Reload Page

    }
#endregion

}

